package com.code.day13;

import java.io.UnsupportedEncodingException;
import java.lang.reflect.Array;
import java.util.Arrays;

public class Day13StringZhuan {
    public static void main(String[] args) throws UnsupportedEncodingException {
        String s = "abcdefg";
        char[] charArray = s.toCharArray();
        System.out.println(charArray);
        /**
         * print或者println有直接输出char数组的方法 而不是输出地址值
         */

        byte[] bytes = "abcdefg".getBytes();
        System.out.println(Arrays.toString(bytes));

        String newStr = s.replace("a","z");
        System.out.println(newStr);

        byte[] gbks = "你".getBytes("GBK");
        System.out.println(Arrays.toString(gbks));

    }
}
